<?php
/**
 * Created by PhpStorm.
 * User: HaYiiRo
 * Date: 2018/1/27
 * Time: 15:47.
 */

namespace App\Model\Common;

use Illuminate\Support\Facades\Session;

class UserMenu extends Menu
{
    protected $cacheKey = 'user_menus';
    protected $originCacheKey = 'user_origin_menus';
    protected $Group = UserGroup::class;

    public function refreshCache($menu, $mode = 'update')
    {
        $this->getMenus(['no_cache' => true]);
        Session::forget('user:pids');
    }
}
